<?php
/**
 * 秒杀
 * @author ezhu <ezhu@jipukeji.com>
 */

namespace Shop\Model;

class SeckillItemModel extends AdminModel{
  
  /**
   * 自动验证规则
   * @var array
   * @author Max.Yu <max@jipu.com>
   */

  
  
  /**
   * 添加数据
   * @return boolean 更新状态
   * @author Max.Yu <max@jipu.com>
   */
  public function update(){
      $data = $this->create();
      if(!$data){ //数据对象创建错误
          return false;
      }
      $map['item_id'] = $data['item_id'];
      $map['seckill_id'] = $data['seckill_id'];

      $res = $this->where($map)->save($data);
      return $res;
  }

  
}
